<template>
	<view>
		<view class="titlebox">
			<view class="title">
				<text class="fs-32">{{title}}</text>
				<text class="fs-24" :style="'color:' + color">({{num}}块田)</text>
			</view>
			<view v-if='serchShow' class="serch" :style="'color:' + serchColor" @click="serchClick">
				<u-icon name="search" :color="serchColor" size="22"></u-icon>
				<text class="fs-24">高级搜索</text>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'uni-farmtitle',
	props: {
		serchShow:{
			type:Boolean,
			default:false,
		},
		title: {
			type: String,
			default: ''
		},num: {
			type: [String,Number],
			default: '0'
		},
		color: {
			type: String,
			default: '#64CE5F'
		},
		serchColor: {
			type: String,
			default: '#10B9FF'
		}
	},
	data() {
		return {};
	},
	methods: {
		serchClick() {
			this.$emit('isshow')
		}
	}
};
</script>

<style lang="scss">
.titlebox {
	margin: 20rpx 30rpx 0;
	display: flex;
	justify-content: space-between;
	.serch {
		display: flex;
		align-items: center;
	}
}
</style>
